<template>
  <!-- vue3 新特性支持多个跟标签 -->
  <h1>{{ count }}</h1>
  <button @click="btn(1)">点击加1</button>
  <button @click="btn(20)">点击加20</button>
</template>

<script>
import { ref } from 'vue';
const userCount = () => {
  let count = ref(0);
  const btn = (number) => {
    // console.log(14, count);
    count.value += number;
  };
  return { count, btn };
};
export default {
  setup() {
    return { ...userCount() };
  },
};
</script>
